Page({
    data: {
        total: 0,
        date: 0,
        ways: ['余额支付', '微信支付', '支付宝支付'],
        way: null
    },
    onLoad() {
        let total = wx.getStorageSync("total")
        let checked = wx.getStorageSync("checked")
        console.log(checked)
        for (let i in checked) {
            if (checked[i] === true) {
                this.setData({
                    way: this.data.ways[i]
                })
            }
        }
        let date = wx.getStorageSync("dateDone")
        this.setData({
            total: (total / 100 - 1).toFixed(2),
            date: date
        })
    }
    ,
    backToFirst() {
        wx.switchTab({
            url: "../first/index",
            success: (res) => {
            }
        })
    },
    toDetail(){
        wx.navigateTo({
            url: "../orderDetail/index",
            success: (res) => {

            }
        })
    }
})